package com.gxa.www.cl.mapper;

import com.gxa.www.cl.domain.entity.Sale;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface SaleMapper {

    @Select("SELECT * FROM 销售信息表")
    List<Sale> selectAllSales();

    @Insert("INSERT INTO 销售信息表(danjuhao, shijian, zongjiage, jingshouren, beizhu) VALUES (#{danjuhao}, #{shijian}, #{zongjiage}, #{jingshouren}, #{beizhu})")
    void insertSale(Sale sale);

    @Delete("DELETE FROM 销售信息表 WHERE id = #{id}")
    int deleteSaleById(@Param("id") Long id);
}
